<?php
//
// +------------------------------------------------------------------------+
// | Gecko Framework                                                        |
// +------------------------------------------------------------------------+
//

/**
 * GeckoFormFieldInterface
 *
 * Interface for Form Controls
 *
 * @package Gecko.Form;
 * @author Christopher Valderrama <gatorv@gmail.com>
 * @copyright Copyright (c) 2007
 * @version $Id$
 * @access public
 */
interface Gecko_Form_Field_Interface {
	/**
	 * Returns the current control Value
	 *
	 * @return string The Value of the Control
	 */
	public function getValue();
	/**
	 * Returns the control name
	 *
	 * @return string The Control name
	 */
	public function getName();
	/**
	 * Adds a new Validator to the control
	 *
	 * @return boolean Validated or not
	 */
	public function addValidator(Zend_Validate_Interface $validator);
	/**
	 * Function to validate the control
	 *
	 * @return boolean Validated or not
	 */
	public function isValid();
	/**
	 * Returns the Javascript code to interface with GeckoValidator
	 *
	 * @return string Javascript Code
	 */
	public function getJavascriptValidationCode();
	/**
	 * Returns the control Type
	 */
	public function getType();
}